/**
 * @fileoverview lyricViewer 基础程序
 * @author dron
 * @date 2010-05-13
 */

void function(){
	// var modules = System.nameSpace("{systemName}.modules");
	var module = System.nameSpace("{systemName}.modules.lyricViewer");
	var container = System.getModuleContainer("lyricViewer");
	var template = new Ucren.Template(
		"<div class='background' id='@{shadowBid}'></div>",
		"<div class='cover' id='@{shadowFid}'></div>",
		"<div class='cover2' id='@{coverBid}'></div>",
		"<div class='cover3' id='@{coverEid}'></div>",
		"<div class='cover5' id='@{coverFid}'></div>",
		"<div class='cover4'>&nbsp;</div>");

	module.initialize = function(){
		container = Ucren.Element(container);
		container.addClass("overlap");
		container.html(template.apply({
			shadowBid: this.shadowBid = Ucren.id(),
			shadowFid: this.shadowFid = Ucren.id(),
			coverBid: this.coverBid = Ucren.id(),
			coverEid: this.coverEid = Ucren.id(),
			coverFid: this.coverFid = Ucren.id()
		}));

		this.shadowB = Ucren.Element(this.shadowBid);
		this.shadowF = Ucren.Element(this.shadowFid);
		this.coverB = Ucren.Element(this.coverBid);
		this.coverE = Ucren.Element(this.coverEid);
		this.coverF = Ucren.Element(this.coverFid);
	}

	module.setText = function(text){
		text = "<div class='text-inner'>" + text + "</div>";
		this.shadowB.html(text);
		this.shadowF.html(text);
		this.coverB.html(text);
		this.coverE.html(text);
		this.coverF.html(text);
	}

	module.setSentenceWidth = function(n){
		this.shadowF.width(n);
		this.coverF.width(n);
	}

}();